package main

import (
	"flag"
	"fmt"
)

// raw flag
var cliName=flag.String("name","test","this is task name")
var cliPort=flag.Int("port",8899,"this is server port")
var cliLog=flag.String("logpath","/var/log/test","this is log path")

var cliFlag int

func Init() {
	flag.IntVar(&cliFlag,"version",0,"this is agent version")
}
func printRawFlag() {
	Init()
	flag.Parse()
	fmt.Printf("args:%s,num=%d",flag.Args(),flag.NFlag())
	for i := 0; i < flag.NFlag(); i++ {
		fmt.Printf("arg[%d]=%s",i,flag.Arg(i))
	}
	fmt.Printf("cliName=%s",*cliName)
	fmt.Printf("cliPort=%d",*cliPort)
	fmt.Printf("cliLog=%s",*cliLog)
	fmt.Printf("cliFlag=%d", cliFlag)
}
